"""
21 - Dars
"""
words = ['мадам', 'топот', 'test', 'madam', 'word']
palindromes = []

for word in words:
    if word == word[::-1]:
        palindromes.append(word)

palindromes = [word for word in words if word == word[::-1]]

print(palindromes)

my_str = ['Око за око', 'А роза упала на лапу Азора', 'Около Миши молоко']
palindromes = []
for word in my_str:
    WORD_R = word.replace(' ', '').lower()
    if WORD_R == WORD_R[::-1]:
        palindromes.append(word)

print(palindromes)

L = list(range(1, 10))
L2 = list('hello')

print(L, L2, type(L))

S = '-'.join(map(str, L))
S2 = ','.join(L2)

print(S, type(S))
print(S2, type(S2))
